1. Field of the Invention
The present invention relates to an emulator for debugging software that operates on a target micro-controller in a target circuit environment. More specifically, the invention relates to the emulator being programmed into a field programmable gate array (FPGA).
2. Description of the Related Art
An example of a generic micro-controller is the industry standard 8051 originally designed by Intel. New software for different applications of the 8051 is constantly being written and must be debugged.
There are currently two conventional hardware techniques used by programmers to debug computer software code. These techniques include program monitors and microprocessor emulators.
With a program monitor the software debugging is done on the target micro-controller. The program monitor is intrusive software located in code RAM with the operating program that controls the functions of the micro-controller. The program monitor operates in conjunction with and monitors the operation of the operating program. A programmer uses the program monitor to send his own instructions to the micro-controller when it is code fetching and he is able to make the micro-controller interrogate itself. Not all signals in the micro-controller are available to the programmer so the amount of control is limited.
The use of program monitors is advantageous because they are relatively inexpensive and find the majority of errors or "bugs" located in the main program. One drawback of program monitors is that they require the use of resources in the target circuit and typically are ineffective in detecting more difficult problems in the associated program code.
The second type of software debugging tool is an emulator that substitutes for the target micro-controller during target circuit testing and execution. The emulator is non-intrusive and contains a micro-controller and debugging software. A host computer operates in conjunction with the emulator to provide transparent operation of the emulator micro-controller embedded in the target circuit. The emulator traces all activity that occurs at the micro-controller. The emulator provides a complex breakpoint system that monitors the micro-controller activity and stops the micro-controller operations at predetermined points for analysis of certain target circuit signals. The emulator is designed for use primarily in full system integration and for solving real-time problems.
An advanced version of an emulator has a micro-controller and monitoring logic integrated into a bondout integrated circuit. The bondout IC contains monitoring or debug circuitry which provides a window into the operations of the micro-controller. The bondout IC replaces the target micro-controller in the target circuitry. A host computer has a commercially available software debug program which works with the monitoring circuitry to look at the response of the micro-controller as instructions are executed from the program being debugged. The emulator is designed for use primarily in full system integration and for solving real-time problems.
This performance, however, comes at a price. The bondout IC is typically a low volume more complex version of the production device. Thus, one major drawback of emulators is that they are relatively expensive, thereby making them inaccessible to a significant percentage of the growing number of software engineers participating in micro-controller-based circuit design tasks.
What is needed is an emulator for debugging software that operates in real time, is economical to create, and may be programmed to have a variety of configurations.